/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.unal.bioingenium.kbmed.features;

import gnu.trove.map.TIntObjectMap;
import gnu.trove.map.hash.TIntObjectHashMap;
import java.io.Serializable;

/**
 *
 * @author Alejandro Riveros Cruz Riveros Cruz
 */
public class CollectionFeatures implements Serializable {

    //
    private static final long serialVersionUID = 8225718047354967012L;
    //
    private String name;
    //
    private TIntObjectMap<CompactFeatureVector> featuresMap;

    /**
     *
     * @param name 
     */
    public CollectionFeatures(String name) {
        this.name = name;
        featuresMap = new TIntObjectHashMap<CompactFeatureVector>();
    }

    /**
     *
     * @return 
     */
    public int getTotalFeatures() {
        return featuresMap.size();
    }

    /**
     *
     * @param documentId
     * @param featureVector  
     */
    public void setFeatureVector(Integer documentId, CompactFeatureVector featureVector) {
        featuresMap.put(documentId, featureVector);
    }

    /**
     *
     * @param documentId
     * @return  
     */
    public CompactFeatureVector getFeatureVector(Integer documentId) {
        return featuresMap.get(documentId);
    }

    /**
     * 
     * @return
     */
    public TIntObjectMap<CompactFeatureVector> getCollectionFeatures() {
        return featuresMap;
    }

    /**
     * 
     * @param features
     */
    public void setCollectionFeatures(TIntObjectMap<CompactFeatureVector> features) {
        this.featuresMap = features;
    }

    /**
     *
     * @return 
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @param name 
     */
    public void setName(String name) {
        this.name = name;
    }
}
